function landamp


%---------------------------------------------------------

  kz=0.34; jv=256*5/4; vmax=6.25*5/4; vc=0.9*vmax;
  dt=1.e-2; tmax=1000; tsave=0.1; 

  Dvvvv=3.e-6;    % Dvvvv = kz*dv^5: 3e-6 (jv=128) or 1e-7 (jv=256) or 3e-9 (jv=512)
  jv0=32;         % use jv0=32 for IC consistent across jv.

  fbase='jv320_dt1e-2_Dv3e-6';
  fbase = 'test';


%-- initialization ---------------------------------------

  iunit = i;
 
  dv   = 2*vmax/jv;
  v    = ((1:jv)-jv/2-1)*dv;
  dkv  = 2*pi / (2*vmax);
  kv   = [0:jv/2,-jv/2+1:-1] *dkv;
  expD = exp(-kv.^4 *Dvvvv*dt);
  expV = exp(-iunit*kz*v*dt/2);

  Fmw  =   1/sqrt(2*pi) *exp(-v.*v/2);
  dFmw = - v .* Fmw;
 
  gamma = 1 - exp(-(v/vc).^16);
  %expV = expV.*exp(-gamma*dt/2);
  
 
  rand("seed", 1);

  if jv0 < jv

     F1 = (rand(1,jv0) - 0.5) + (rand(1,jv0) - 0.5)*iunit;
     F2 = (rand(1,jv0) - 0.5) + (rand(1,jv0) - 0.5)*iunit;
     F(2:jv0+1)=F1;
     F(jv-jv0+1:jv)=F2;
     F=ifft(F)*jv;  

  else

     F = (rand(1,jv) - 0.5) + (rand(1,jv) - 0.5)*iunit;

  end


  %F  = 0.1*F.*Fmw;


  t=0;

  nmax= fix(tmax/dt);
  
  FF=zeros(1,nmax);

  t=(1:nmax)*dt;
  q0=1.e-3*exp(-t*0.029);



%-------------------

  fid=fopen([fbase,'_vst.dat'], 'wt');
  fprintf(fid, '# 1.t  2.real(sumF)  3.imag(sumF)\n');
  
  for n=1:nmax

  
    F = F.*expV;

    Q = sum(sum(F))*dv;  F = F + iunit/kz*Q*dFmw*dt/2;
  
    ftF = fft(F); ftF = ftF.* expD; F = ifft(ftF);

    Q = sum(sum(F))*dv;  F = F + iunit/kz*Q*dFmw*dt/2;  

    F = F.*expV;


    q(n) = abs(Q);

    if rem(n*dt,tsave) == 0
      %figure(1); plot(v,abs(F), [-3.55,3.55], [0,0], 'or'); axis([-vmax,vmax]);
      %figure(2); semilogy(t(1:n), q(1:n), t(1:n), q0(1:n));
      fprintf(fid, '%16.6e  %16.6e  %16.6e\n', n*dt, real(Q), imag(Q));
    end 

  end

  fclose(fid);


  fid=fopen([fbase,'_end.dat'], 'wt');
  fprintf(fid, '# 1.v  2.real(F)  3.imag(F)\n');
  for iv=1:jv
    fprintf(fid, '%16.6e  %20.10e  %20.10e\n', v(iv), real(F(iv)), imag(F(iv)));
  end
  fclose(fid);

  return


end

%---------------------------------------------------------
